fix: Do not propagate in-scene value to dynamically spawned children [MTT-5357]#2396
Merged
NoelStephensUnity merged 7 commits intodevelopfrom Feb 8, 2023
Conversation
This resolves the issue with dynamically spawned NetworkObjects that are parented under an in-scene placed NetworkObject would be marked as in-scene placed and cause client-side soft synchronization issues due to the client looking for an in-scene placed NetworkObject that was actually dynamically spawned.
Added integration test to validate this fix. This tests that both players and dynamically spawned NetworkObjects that are parented under in-scene placed NetworkObjects works and that late joining clients properly synchronize the parented status. This also validates an advanced parenting sample in our documentation works.
…amically-spawned-children
…amically-spawned-children
ShadauxCat
reviewed
Feb 1, 2023
| @@ -0,0 +1,61 @@ | |||
| using UnityEngine.SceneManagement; | |||
Collaborator
There was a problem hiding this comment.
Any chance there could be an automated test for this instead of only manual tests? Manual tests only catch things if someone remembers to run them.
Member
Author
There was a problem hiding this comment.
There are two tests in this PR:
Manual test: this script is used in that.
Integration Test: (see ObjectParenting/ParentDynamicUnderInScenePlaced.cs below)
They both accomplish the same thing, with the manual test being something you can visually confirm and make adjustments to in the event any future seemingly related issues are filed and need to be replicated/confirmed an issue (or debugged).
…amically-spawned-children
ShadauxCat
approved these changes
Feb 8, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves a regression bug with the last parenting updates where a dynamically spawned NetworkObject that was parented under an in-scene placed NetworkObject would have its InScenePlaced value set to true causing a soft synchronization error on a late joining client side.
MTT-5357
Pertains to issue #2358
Changelog
NetworkObjectparented under an in-scene placedNetworkObjectwould have itsInScenePlacedvalue changed totrue. This would result in a soft synchronization error for late joining clients.Testing and Documentation